﻿Imports DAO
Imports DTO

Public Class PhieuRutTienBUS
    Public Function ThemPhieuRutTien(ByVal prtDTO As PhieuRutTienDTO) As Integer
        Dim prtDAO As New PhieuRutTienDAO()
        Return prtDAO.ThemPhieuRutTien(prtDTO)
    End Function
    'Lay ma phieu rut max
    Public Function LayMaPhieuRutMax() As Integer
        Dim prtDAO As New PhieuRutTienDAO()
        Return prtDAO.LayMaPhieuRutMax()
    End Function
    'Tim kiem phieu goi tien theo nhieu tieu chi
    Public Function TimKiemTheoNhieuTieuChi(ByVal prtCrt As PhieuRutTienCrt) As List(Of PhieuRutTienCrt)
        Dim prtDAO As New PhieuRutTienDAO()
        Return prtDAO.TimKiem(prtCrt)
    End Function
    'Lay thong tin phieu rut tien theo ma phieu rut
    Public Function LayThongTinPhieuRutTien(ByVal maphieurut As Integer) As DataTable
        Dim prtDAO As New PhieuRutTienDAO()
        Return prtDAO.LayThongTinPhieuRut(maphieurut)
    End Function
    'ham cap nhat phieu goi tien
    Public Function CapNhatPhieuRutTien(ByVal prtDTO As PhieuRutTienDTO) As Integer
        Dim prtDAO As New PhieuRutTienDAO()
        Return prtDAO.CapNhatPhieuRutTien(prtDTO)
    End Function

    Public Function LayThongTinDanhSachPhieuRutTien() As DataTable
        Dim dt As New DataTable()
        Dim prtDao As New PhieuRutTienDAO()
        dt = prtDao.LayThongTinDanhSachPhieuRutTien()
        Return dt
    End Function
    Public Function ImportDanhSachTuExcel(ByVal str As String) As DataTable
        Dim prtDAO As New PhieuRutTienDAO()
        Return prtDAO.ImportDanhSachTuExcel(str)
    End Function
    Public Function TongChi(ByVal _date As Date) As DataTable
        Dim prtDAo As New PhieuRutTienDAO()
        Return prtDAo.TongChi(_date)
    End Function
End Class